<%@page contentType="text/html;charset=UTF-8"%>
<%@ page import="whf.framework.web.Constants"%>
<%@ page import="whf.framework.util.DateUtils" %>

<%@taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/tlds/framework.tld" prefix="framework"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><framework:attr source="STRUTS-META" attr="name" /></title>
<jsp:include page="/common/inc/select.jsp" />
</head>

<body>
<html:form action='<%=  (String)request.getAttribute(Constants.STRUTS_PATH) %>' method="post">
<html:hidden property="webMethod" value="" />
<framework:ext />
<framework:table pkStyle="" navPosition="both" queryString="<%= (String)request.getAttribute("queryString") %>">
	<framework:caption><span class="whf_object_title"><framework:attr source="STRUTS-META" attr="name" /></span></framework:caption>
	<framework:rowext>
	<logic:present name="currentRow">
	<div nowrap>
	<%
	whf.survey.entity.Survey survey = (whf.survey.entity.Survey)request.getAttribute("currentRow");
	java.sql.Date startDate = survey.getStartDate();
	java.sql.Date endDate = survey.getEndDate();
	if(endDate == null) endDate = new java.sql.Date(System.currentTimeMillis() + 1000);
	if(DateUtils.between(new java.util.Date(), startDate, endDate)){
	%>
	<a href='<%= request.getContextPath() %>/survey/Survey.do?webMethod=viewTopics&id=${id}&ext0=${id}'>进入投票</a>
	<br>
	<%}%>
	<a href='<%= request.getContextPath() %>/survey/Survey.do?webMethod=answers&id=${id}'>查看结果</a>
	</div>
	</logic:present>
	</framework:rowext>
</framework:table>
</html:form>

</body>
</html> 